import api from "../api/api";
import { Get, Post } from "../api/axios";
export function getbanner(callback) {
  Get(api.getbanner, callback);
}
export function getBlogs(data, callback) {
  Post(api.getBlogs, data, callback);
}
export function gettypetag(callback) {
  Get(api.gettypetag, callback);
}
export function getTypedata(callback) {
  Get(api.getTypedata, callback);
}
export function getTypeBlog(data, callback) {
  Get(`${api.getTypeBlog}?blog_type="${data.id}"`, callback);
}
export function getTagBlog(data, callback) {
  Get(`${api.getTagBlog}?blog_Tag="${data.id}"`, callback);
}
export function register(data, callback) {
  Post(api.register, data, callback);
}
export function login(data, callback) {
  Post(api.login, data, callback);
}
export function addleaveMsg(data, callback) {
  Post(api.addleaveMsg, data, callback);
}
export function getleavemessage(data, callback) {
  Post(api.getleavemessage, data, callback);
}
export function getDetail(data, callback) {
  Get(`${api.getDetail}?id="${data.id}"`, callback);
}
export function getw(data, callback) {
  Get(
    `https://v0.yiketianqi.com/api?unescape=1&version=v61&appid=95346264&appsecret=Q8GbHLrj&city=${data.city}`,
    callback
  );
}
export function addcomment(data, callback) {
  Post(api.addcomment, data, callback);
}
export function getcomment(data, callback) {
  Post(api.getcomment, data, callback);
}
